package musicserver;

import java.io.Serializable;
import java.util.ArrayList;

public class Album implements Serializable{
	private static final long serialVersionUID = 1L;
	String name;
	ArrayList<Music> tracks;
	public Album(String n) {
		name = n;
		tracks = new ArrayList<Music>();
	}

	public String getName() {
		return name;
	}
	
	public ArrayList<Music> getTracks(){
		return tracks;
	}
	
	public void addTrack(Music track){
		tracks.add(track);
	}

	public ArrayList<String> getTrackNames() {
		ArrayList<String> tl = new ArrayList<String>();
		for (Music track : tracks) {
			tl.add(track.getTrackName());
		}
		return tl;
	}
}
